-- CALC_PLAYER_COMPREHENSIVE_SCORE

-- 计算玩家的综合得分
-- @param user 玩家对象
return function(user)
    -- 玩家的综合得分 = 玩家所有迷宫中的最高得分之和  + 冈布奥星级之和*100

    local totalScore = 0;

    local dungeonScore = user.dbase:query("dungeon_score", {});
    for _, score in pairs(dungeonScore) do
        totalScore = totalScore + score;
    end

    local pets = user:getAllPets();
    local rankSum = 0;
    for _, pet in pairs(pets) do
        rankSum = rankSum + pet:getRank();
    end

    totalScore = totalScore + rankSum*100;
    return totalScore;
end

